stage.set_background("concert")
sprite = codesters.Sprite("person1")
sprite.move_down(100)
sprite.set_speed(3)
sprite.flip_up_down()
sprite.move_right(150)
sprite.move_left(200)
sprite.flip_up_down()
sprite.turn_left(360)
try:
tval1 = sprite.get_flip()
except:
tval1 = "DNE"
try:
tval2 = stage.get_total_wait_time()
except:
tval2 = "DNE"
t1 = TestObjective()
t1.add_success(tval1 == True, "Great Job!")
t1.add_failure(tval1 == False, "Did you add the new dance move?")
t1.add_failure(tval1 == "DNE", "Did you delete the sprite?")
t2 = TestObjective()
t2.add_success(tval2 == 1, "Great Job!")
t2.add_failure(tval2 == 0, "Did you add a Wait command?")
t2.add_failure(tval2 == 2, "Did you change the integer in wait?")
t2.add_creative(tval2 != 1 and tval2 != 0 and tval2 != 2 and tval2 != "DNE", "That is a good wait time!")
t2.add_default("Creative choice!")
tester = TestManager()
tester.add_test_list([t1, t2])
tester.run_tests()
tester.display_first_feedback()
-
Run Code
-
Activity Submitted!
Enviar Trabajo
-
Actividad Siguiente
-
Stop Running Code
-
Show Chart
-
Show Console
-
Reset Code Editor
-
Codesters How To (opens in a new tab)